# Copyright (c) 2022, hzmes and contributors
# For license information, please see license.txt

import frappe
from frappe.model.document import Document

class SRMNamingSeries(Document):
	def before_insert(self):
		if_exist = frappe.db.exists(self.doctype, {'doctype_name': self.doctype_name, 'date': self.date})
		if if_exist:
			frappe.throw(f'{self.doctype_name} And {self.date} Is Repeat')
